package com.fpx.open.platform.domain;

import java.io.Serializable;

/**
 * 应用和帐户关系实体
 * 
 * @author sunkey
 * @date Apr 2, 2013 9:43:51 AM
 * @version 1.0.0 
 */
public class RelAppUserInfo implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 是否有效，1:有效，0,无效
     */
    private Short isEffect;
    /**
     * 应用ID,ApplicationEntity ID
     */
    private Integer appId;
    /**
     * 帐户ID, AccountEntity ID
     */
    private Integer userId;

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    
    public Short getIsEffect() {
        return isEffect;
    }

    public void setIsEffect(Short isEffect) {
        this.isEffect = isEffect;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RelAppUserInfo other = (RelAppUserInfo) that;
        return (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getIsEffect() == null ? other.getIsEffect() == null : this.getIsEffect().equals(other.getIsEffect()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getIsEffect() == null) ? 0 : getIsEffect().hashCode());
        return result;
    }
}